package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 路由 实体
 * </p>
 *
 * @author 黄露
 * @since 2021-05-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
// "DeviceRoute对象", description = "路由")
public class DeviceRoute extends Model<DeviceRoute> {

  private static final long serialVersionUID = 1L;

  // "路由id")
  @TableId(value = "route_id", type = IdType.AUTO)
  private Integer routeId;

  // "路由组id")
  private Integer groupId;

  // "路由名称")
  private String routeName;

  // "路由类型")
  private String routeType;

  // "客户名称")
  private String customerName;

  // "开始设备")
  private String deviceSnFrom;

  // "终点设备")
  private String deviceSnTo;

  // "绑定光缆信息")
  private String bindInfo;

  // "fms单盘id")
  private String fmsSn;

  // "osw单盘id")
  private String oswSn;

  // "opm单盘id")
  private String opmSn;

  // "光开关id集合")
  private String osSns;

  // "周期测试间隔")
  private Integer autoMeasureInterval;
  // "sor类型 默认1 = 文件")
  private Integer sorType;

  // "备注")
  private String remark;

  // "创建人")
  private String createBy;

  // "创建时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;

  @Override
  public Serializable pkVal() {
    return this.routeId;
  }

  @TableField(exist = false)
  private List<DeviceRouteConfig> deviceRouteConfigList;

  @TableField(exist = false)
  private List<DeviceRouteAlarmSetting> deviceRouteAlarmSettingList;
}
